FROM openjdk:21

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom", "-jar", "/usr/share/myservice/myservice.jar"]

# Add Maven dependencies (not shaded into the artifact; Docker-cached)
# ADD target/lib           /usr/share/myservice/lib
# Add the service itself
ARG JAR_FILE
ADD target/${JAR_FILE} /usr/share/myservice/myservice.jar


# # 添加 Java 8 镜像来源
# FROM java:8
# # 添加参数
# ARG JAR_FILE
# # 添加 Spring Boot 包
# ADD target/${JAR_FILE} app.jar
# # 执行启动命令
# ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]